Skip to content

Change default ports to math constants (π/e/φ)#14

Merged
smilebank7 merged 2 commits into
mainfrom
chore/default-ports
Jun 8, 2026
Merged

Change default ports to math constants (π/e/φ)#14
smilebank7 merged 2 commits into
mainfrom
chore/default-ports

Conversation

@smilebank7

@smilebank7 smilebank7 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

What

세 서비스의 기본 포트를 수학 상수로 통일.

서비스 변경 의미
agent 300031415 π
web 300127182 e
math-engine 800016180 φ (황금비)

Why

기본 포트(3000, 3001, 8000)는 다른 프로세스가 자주 점유 — Mantis, 별도 Next.js, Django/FastAPI 등. 외우기 쉽고 OpenMath 정체성에 맞는 수학 상수로 통일.

Where (영향 범위)

코드 default

  • packages/agent/src/config/env.tsPORT, MATH_ENGINE_URL Zod default
  • packages/agent/src/server/app.ts — CORS allowlist
  • packages/web/hooks/use-verification-stream.ts — SSE endpoint fallback
  • packages/math-engine/run.py — uvicorn port
  • packages/web/package.jsonnext dev --port / next start --port

활성 config

  • packages/agent/.env.example

활성 문서

  • README.md, AGENTS.md, packages/web/README.md, docs/specs/rag-integration.md

의도적 보존

  • deliverables/openmath_handoff_2026-05-07/ — 핸드오프 시점 스냅샷, 역사 박제로 유지

How tested

  • lsp_diagnostics clean: env.ts, app.ts, use-verification-stream.ts
  • Pre-push hook 통과: Node vitest 54 passed, Python pytest 20 passed

Migration

이미 packages/agent/.envPORT=3000을 박아둔 환경은 자동으로 새 default가 적용되지 않습니다. 다음 중 하나:

  • .env에서 PORT 라인 삭제 (코드 default 31415 사용)
  • PORT=31415로 갱신

packages/web/.env.localNEXT_PUBLIC_AGENT_URL=http://localhost:3000이 박혀있다면 동일하게 갱신 또는 삭제.

Note

이 PR의 일부 staged 파일 (AGENTS.md, README.md, packages/web/README.md 등)에는 working tree에 존재하던 다른 in-progress 작업도 함께 포함됩니다:

  • AGENTS.md §2: D-11 (I-G4 투명 노출 정책), D-12 (S0-B OCR v2 보류) mapping 추가
  • AGENTS.md §9: "진입점 우선순위(미구현)" → "진입점 현황(구현 완료)" 통째 재작성
  • AGENTS.md §10: 결정 카운트 8개 → 12개 갱신
  • 그 외 자잘한 문서/주석 동기화

사용자 명시적 승인하에 mixed로 묶음 — 분리 시 작업량 과다.


Summary by cubic

Switch default dev ports to math constants to avoid conflicts and match OpenMath’s identity. agent now uses 31415 (π), web 27182 (e), and math-engine 16180 (φ).

  • Refactors

    • Defaults: PORT 31415, MATH_ENGINE_URLhttp://localhost:16180, Next dev/start → 27182, uvicorn → 16180.
    • Cross-service: CORS allowlist updated to http://localhost:27182; web SSE hook fallback now http://localhost:31415.
    • Docs/config: Updated packages/agent/.env.example, README.md, AGENTS.md, packages/web/README.md, docs/specs/rag-integration.md (agent fully implemented, SSE streaming in web, D-11/D-12 added, decisions D-1~D-12, math-engine tests 20).
    • Snapshot at deliverables/openmath_handoff_* intentionally unchanged.
  • Migration

    • If packages/agent/.env sets PORT=3000, remove it or change to 31415.
    • If packages/web/.env.local sets NEXT_PUBLIC_AGENT_URL=http://localhost:3000, remove it or change to http://localhost:31415.

Written for commit c3a8964. Summary will update on new commits.

Review in cubic

agent 3000 → 31415 (π)
web 3001 → 27182 (e)
math-engine 8000 → 16180 (φ)

영향:
- 코드 default 5곳: PORT/MATH_ENGINE_URL Zod default, CORS allowlist,
  SSE hook fallback, uvicorn port, next dev/start port
- 활성 config: agent/.env.example
- 활성 문서 4종: README, AGENTS, web README, rag-integration spec

핸드오프 스냅샷(deliverables/openmath_handoff_*)은 의도적으로 보존.

Note: AGENTS.md, README.md 등 일부 파일은 working tree에 존재하던
다른 in-progress 작업(D-11/D-12 mapping, §9 진입점 현황 재작성 등)도
함께 묶여 들어감 (사용자 승인).
@smilebank7 smilebank7 enabled auto-merge (squash) June 8, 2026 09:02
@smilebank7 smilebank7 merged commit c1ccc44 into main Jun 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant